package com.nsl.my_youlai.mystar.enums;

import com.baomidou.mybatisplus.annotation.EnumValue;
import lombok.Getter;

public enum NslEnumMime implements NslEnumBaseI<String> {

    OFFICE_DOCX("docx", "application/vnd.openxmlformats-officedocument.wordprocessingml.document"),
    OFFICE_DOC("doc", "application/msword"),

    OFFICE_XLS("xls", "application/vnd.ms-excel"),

    OFFICE_XLSX("xlsx", "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"),
    TEXT_TXT("txt","text/plain"),

    ZIP_ZIP("zip","application/zip"),

    OTHER("other","application/octet-stream"),

    ;
    @Getter
    @EnumValue
    private String value;

    @Getter
    private String label;

    NslEnumMime(String value, String label) {
        this.value = value;
        this.label = label;
    }

    public String getExtension(){
        return this.value;
    }

    @Override
    public EnumTypeEnum getEnumType() {
        return EnumTypeEnum.HTTP_MIME_TYPE_ENUM;
    }
}
